

<tagLib name="html" />
<include file="../Public/header" />
<div id="wrap"> <include file="../Public/top" />
    <div id="content">
        <div class="mainarea">
            <div class="maininner">

                <div class="bdrcontent">
                    <form id="phpform" method="post" action="__URL__/insert" class="formtable" onsubmit="return $.formValidator.pageIsValid('1')">
                        <table width="100%" cellpadding="0" cellspacing="0" class="formtable">
                            <tr>
                                <td>group_id：</td>
                                <td>{.gid}<input name="group_id" type="hidden" style="width:260px;" id="group_id" value="{.gid}" /></td>
                            </tr>
                            <tr>
                                <td>nid:</td>
                                <td><input type="text" name="nid" id="nid"  style="width:90px;"/>
                                    <select name="nav" id="nav">
                                        <volist name="nav" id="nav">
                                            <option value="{$nav.id}">{$nav.name}</option>
                                        </volist>
                                    </select>
                                </td>
                            </tr>
                            <tr>
                                <td>action：</td>
                                <td><input name="action" type="text" style="width:90px;" id="action"  />
                                    <select id="module" name="module">
                                        <volist name="module" id="module">
                                            <option value="{$module.name}">{$module.cnName}</option>
                                        </volist>
                                    </select>
                                </td>
                            </tr>
                            <tr>
                                <td>method：</td>
                                <td><select name="method" id="method">
                                        <option value="index">默认页面</option>
                                        <option value="add">添加</option>
                                        <option value="edit">编辑</option>
                                        <option value="delete">删除</option>
                                </select></td>
                            </tr>

                            <tr>
                                <td>&nbsp;</td>
                                <td><input type="submit" value="提交" class="submit" />
                                    <input name="reset" type="reset" value="重置" class="submit" />
                                <input name="button" type="button" value="返回" onclick="javascript:history.go(-1);"  class="submit" /></td>
                            </tr>
                        </table>
                    </form>
                </div>
                <br />
            </div>
        </div>
    <include file="../Public/menu" /> </div>
<include file="../Public/footer" /> </div>
</body>
</html>

<script type="text/javascript">
    $('#nav').change(function(){
        var result = $("select[@name=nav] option[@selected]").val();
        $("#nid").val(result);
    });

    $('#module').change(function(){
        var result = $("select[@name=module] option[@selected]").val();
        $("#action").val(result);
    });
    $(document).ready(function(){

        $.formValidator.initConfig({autotip:true,tidymode:true,onerror:function(msg){alert(msg)}});
        // $("#id").formValidator({onshow:"请输入id",onfocus:"id必须输入",oncorrect:"恭喜你,通过了"}).inputValidator({min:1,onerror:"你输入的id长度不正确,请确认"});
        // $("#group_id").formValidator({onshow:"请输入group_id",onfocus:"group_id必须输入",oncorrect:"恭喜你,通过了"}).inputValidator({min:1,onerror:"你输入的group_id长度不正确,请确认"});
        // $("#action").formValidator({onshow:"请输入action",onfocus:"action必须输入",oncorrect:"恭喜你,通过了"}).inputValidator({min:1,onerror:"你输入的action长度不正确,请确认"});
        // $("#method").formValidator({onshow:"请输入method",onfocus:"method必须输入",oncorrect:"恭喜你,通过了"}).inputValidator({min:1,onerror:"你输入的method长度不正确,请确认"});
    });

</script>